<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>&nbsp;</title>
<include file="Public/header" />
<script type="text/javascript" src="__PUBLIC__/Js/jquery.validate.js"></script>

</head>


<body>
<div>
   
  
        <div class="list_vmall_man">
        	<div class="list_vmall_le">
            	<include file="./Apps/BoxAdmin/View/Public/adminMenu.html" />
            </div>
            <div class="list_vmall_rig">
            	<ul class="breadcrumb clearfix">
                    <li><a href="<{:U('index')}>">卡券管理</a> <span class="divider">/</span></li>
                    <li class="active">导入卡券</li>
                </ul>
                <div class="list_vmall_bort">
                    <form enctype="multipart/form-data" id="myform" method="post" action="<{:U('import')}>">
                    	<div class="vmall_padi">


                            <div class="vmall_cle">
                                <label for="input-title" class="vmall_te_le">选择Excle文件</label>
                                <div class="vmaal_rols">
                                    <input name="excel" id="excel" type="file" value="上传">
                            (<a href="/Application/card_imp.xls" >查看示例</a>)
                                </div>
                            </div>
                           
                            <div class="vmall_cle">
                                <div class="vmaal_rols">
                                    <button class="v_mall_q_1" style="border:0; height:32px; padding-top:0; cursor:pointer;" type="submit">确&nbsp;&nbsp;定</button>
                                </div>
                            </div>

                         </div>
                     </form> 
                </div>
                
            </div>

        </div>
        
</div>
<script type="text/javascript">
    $('#excel').change(function(){
        var excel=$(this).val();
        var ext = excel.split('.')[1];
        if(ext == 'xls' || ext == 'xlsx'){
            
        }else{
            alert('请上传后缀为.xls或者.xlsx的文件');
            return false;
        }
    })
    $('#myform').submit(function(){
    
        var excel=$('#excel').val();
        if(excel==''){
            alert('请上传excel文件');
            return false;
        }
        var ext = excel.split('.')[1];
        if(ext == 'xls' || ext == 'xlsx'){
            
        }else{
            alert('请上传后缀为.xls或者.xlsx的文件');
            return false;
        }

    })
</script>
</body>
</html>
